package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpMember;
import com.len.service.SpMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("member")
public class SpMemberController extends BaseController<SpMember> {
    @Autowired
    private SpMemberService spMemberService;
    @RequestMapping("/save")
    public String save(SpMember spMember){
        try {
            spMemberService.insert(spMember);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/update")
    public String update(SpMember spMember){
        try {
            spMemberService.updateByPrimaryKey(spMember);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/show")
    public String show(SpMember spMember){
        try {
            spMemberService.selectByPrimaryKey(spMember);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
